﻿using BPMN.Domain;
using BPMN.Domain.Entity;
using BPMN.Domid.Dto.PermissionDto;
using BPMN.Domid.Dto.RoleDto;
using BPMN.Domid.Dto.UserDtos;
using BPMN.Domid.Share.AuditResult;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPMN.appilcation.IService
{
    public interface IRoleUserService: IScoped
    {
        /// <summary>
        /// 用户添加
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ResultDto<string>> UserAdd(CreateUpdateUserDto dto);
        /// <summary>
        /// 用户修改
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ResultDto<string>> UserUpdate(CreateUpdateUserDto dto);
        /// <summary>
        /// 查询单条数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ResultDto<UserresDto>> UserGet(int id);
        /// <summary>
        /// 查询全部数据
        /// </summary>
        /// <returns></returns>
        Task<ResultDto<List<UserresDto>>> UserGetAll();
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ResultDto<string>> UserDelete(int id);
        /// <summary>
        /// 添加角色
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ResultDto<string>> AddRoleDato(RoleDto dto);
        /// <summary>
        /// 角色修改
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ResultDto<string>> RoleUpdate(RoleDto dto);
        /// <summary>
        /// 角色查询单条数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ResultDto<RoleDto>> RoleGet(int id);
        /// <summary>
        /// 查询角色信息
        /// </summary>
        /// <returns></returns>
        Task<ResultDto<List<RoleDto>>> GetRoleDto();
        /// <summary>
        /// 角色删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ResultDto<string>> DeleteRoleDto(int id);
        /// <summary>
        /// 用户注册信息
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ResultDto<string>> AddUserRole(AddUserRoleDto dto);
        /// <summary>
        ///显示
        /// </summary>
        /// <returns></returns>
        Task<ResultDto<List<ListUserRoleDto>>> GetUserRole();
        /// <summary>
        ///获取单条数据
        /// </summary>
        /// <returns></returns>
        Task<ResultDto<List<ListUserRoleDto>>> GetUserinfoRole(int id);
        /// <summary>
        /// 用户修改
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ResultDto<string>> UpdateRole(UpdateUserRoleDto dto);
        /// <summary>
        /// 添加权限
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ResultDto<string>> AddPerDato(PermissionDtos dto);
        /// <summary>
        /// 权限修改
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ResultDto<string>> PerUpdate(PermissionDtos dto);
        /// <summary>
        /// 查询权限信息
        /// </summary>
        /// <returns></returns>
        Task<object> GetPerDto(int id);
        /// <summary>
        /// 权限删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<ResultDto<string>> DeletePerDto(int id);
        /// <summary>
        /// 查询角色信息
        /// </summary>
        /// <returns></returns>
        Task<ResultDto<List<RoleDto>>> PageGetAllRoleDto(string? RoleName, int pageIndex, int pageSize, int totalCount, int pageCount);

        /// <summary>
        /// 添加权限
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ResultDto<string>> AddRolePer(RolePerDto dto);
        /// <summary>
        /// 权限获取
        /// </summary>
        /// <param name="RoleId"></param>
        /// <returns></returns>
        Task<ResultDto<List<GetRoLEPermissionDto>>> GetRolePermissionsDto(int RoleId);
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<ResultDto<string>> GetLongin(UsersDto dto);
        /// <summary>
        /// 菜单列显示
        /// </summary>
        /// <param name="Userid"></param>
        /// <returns></returns>
       Task<ResultDto<List<PerPtyeDtos>>> PerPermissionDtosShow(int Userid);

    }
}
